<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <div></div>
    <script>
        // location.href 改变跳转
        var div = document.querySelector('div')
        let tim = 5
        function tiao() {
            if (tim == 0) {
                location.href = 'http://127.0.0.1:5500/pink/js_/webAPI/%E5%A4%9A%E4%BD%99%E7%9A%84%E7%BB%83%E4%B9%A0/tab%E6%A0%8F.html'
            } else {
                div.innerHTML = tim + '秒之后跳转'
                tim--;
            }
        }
        tiao()
        setInterval(tiao, 1000)
    </script>
</body>

</html>